Optical devices, such as optical emitters, optical detectors, optical amplifiers, and the like, may emit or receive light via an optical surface. For various such devices, the optical surface may be or may include an electronic component or other component that may be sensitive to environmental conditions. Certain optical devices, such as optoelectronics generally, including light emitting diodes (LEDs), laser diodes, and photosensors, can include solid state electronic components that may be susceptible to electrical shorts or other damage from environmental conditions if not protected. Even optical devices that may not be immediately susceptible may degrade over time if not protected. Further, such optical devices may include optical surfaces, such as that emit or detect light, that may have a relatively high refractive index in comparison with air or other ambient gas.